// 引入vue-axios插件
import Vue from 'vue'
import axios from 'axios'
import VueAxios from 'vue-axios'
import qs from 'qs'
Vue.use(VueAxios, axios)
/* eslint-disable*/

// 订单查询

function orderQuery(host, json) {
  return new Promise((resolve, reject) => {
    Vue.axios.post(host, qs.stringify(json)).then((response) => {
      if (response.status == 200) {
        //console.log('123')
        //console.log(response)
        // 200成功
        resolve(response)
      } else {
        reject(response)
      }
    }).catch((error) => {
      reject({
        status: -1,
        message: '系统错误，请稍后重试'
      })
    })
  })
}


export {
  orderQuery
}


